package com.sugon.utils;

/**
 * ERMS业务工具类
 *
 * @author YuXD
 * @since 2022-07-12
 */
public class ErmsUtil {

    /**
     * 从模具型芯条码中解析出月份
     * TDM0003202201-11 -> 202201
     * DC0645202201-1 -> 202201
     *
     * @param uniqueCode 模具型芯条码
     * @return
     */
    public static String parseMonth(String uniqueCode) {
        uniqueCode  = uniqueCode.split("-")[0];
        return uniqueCode.substring(uniqueCode.length() - 6);
    }

}
